package com.wonderful.wedding.mapper;

import com.wonderful.wedding.model.Person;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface PersonMapper {

    @Select("SELECT * FROM person WHERE name = #{name}")
    public Person findByName(@Param("name") String name);

    @Insert("INSERT INTO person (name) VALUES(#{name})")
    int create(Person person);
}
